using System.Collections.Specialized;
using System.Text;
using Godot;
using System;

public class StatePanel : Control
{
    public TextureProgress hpp, hgp, sp;
    public Label cl, hpl, hgl, sl;
    public override void _Ready()
    {
        hpp = GetNode<TextureProgress>("HpState/TextureProgress");
        hgp = GetNode<TextureProgress>("HgState/TextureProgress");
        sp = GetNode<TextureProgress>("StaminaState/TextureProgress");
        cl = GetNode<Label>("CashState/label");
        hpl = GetNode<Label>("HpState/label");
        hgl = GetNode<Label>("HgState/label");
        sl = GetNode<Label>("StaminaState/label");
    }

    public void UpdataHp(int hp, int max)
    {
        hpl.Text = hp + "/" + max;
        hpp.MaxValue = max;
        hpp.Value = hp;
    }
    public void UpdataHg(int hg, int max)
    {
        hgl.Text = hg + "/" + max;
        hgp.MaxValue = max;
        hgp.Value = hg;
    }
    public void UpdataCash(int cash)
    {
        cl.Text = cash.ToString();
    }
    public void UpdataStamina(int stamina, int max)
    {
        sl.Text = stamina + "/" + max;
        sp.MaxValue = max;
        sp.Value = stamina;
    }
}
